﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TestTaskTests
{
    public class TestsBase
    {
        protected void AssertEquals<T>(IEnumerable<T> a, IEnumerable<T> b)
        {
            using (var aa = a.GetEnumerator())
            using (var bb = b.GetEnumerator())
            {
                while (aa.MoveNext())
                {
                    if (!bb.MoveNext()) Assert.Fail();
                    if (!aa.Current.Equals(bb.Current)) Assert.Fail();
                }
                if (bb.MoveNext()) Assert.Fail();
            }
        }
    }
}
